.class public Lcom/xingbook/park/activity/CoverFlowAct;
.super Lcom/xingbook/park/activity/BaseActivity;

# interfaces
.implements Landroid/view/View$OnTouchListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;
.implements Landroid/widget/AdapterView$OnItemSelectedListener;


# instance fields
.field private a:Landroid/widget/TextView;

.field private b:I

.field private c:[Lcn/a/a/c/a;

.field private d:I

.field private e:Lcom/xingbook/c/a;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->d:I

    return-void
.end method


# virtual methods
.method public e()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u661f\u5b9d\u4e66-\u9605\u8bfb\u76ee\u5f55"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f03000b

    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/CoverFlowAct;->setContentView(I)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "current"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->b:I

    iput v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->d:I

    invoke-static {}, Lcom/xingbook/c/a;->a()Lcom/xingbook/c/a;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->e:Lcom/xingbook/c/a;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->h()Lcom/xingbook/d/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/d/a;->q()Lcn/a/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/a;->f()[Lcn/a/a/c/a;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->c:[Lcn/a/a/c/a;

    const v0, 0x7f0a0090

    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/CoverFlowAct;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/xingbook/ui/GalleryFlow;

    const v1, 0x7f0a008f

    invoke-virtual {p0, v1}, Lcom/xingbook/park/activity/CoverFlowAct;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/xingbook/park/activity/CoverFlowAct;->a:Landroid/widget/TextView;

    const v1, 0x7f0a0091

    invoke-virtual {p0, v1}, Lcom/xingbook/park/activity/CoverFlowAct;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    new-instance v1, Lcom/xingbook/park/a/s;

    iget-object v2, p0, Lcom/xingbook/park/activity/CoverFlowAct;->c:[Lcn/a/a/c/a;

    invoke-direct {v1, p0, v2}, Lcom/xingbook/park/a/s;-><init>(Landroid/content/Context;[Lcn/a/a/c/a;)V

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/GalleryFlow;->setAdapter(Landroid/widget/SpinnerAdapter;)V

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/GalleryFlow;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/GalleryFlow;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V

    iget v1, p0, Lcom/xingbook/park/activity/CoverFlowAct;->b:I

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/GalleryFlow;->setSelection(I)V

    return-void
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->e:Lcom/xingbook/c/a;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/xingbook/c/a;->a(I)V

    iget v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->d:I

    if-ne v0, p3, :cond_0

    iget v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->b:I

    if-ne v0, p3, :cond_1

    const/4 v0, -0x1

    :goto_0
    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/CoverFlowAct;->setResult(I)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->finish()V

    iget v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->b:I

    if-le p3, v0, :cond_2

    const v0, 0x7f04001c

    const v1, 0x7f040020

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/park/activity/CoverFlowAct;->overridePendingTransition(II)V

    :cond_0
    :goto_1
    return-void

    :cond_1
    move v0, p3

    goto :goto_0

    :cond_2
    iget v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->b:I

    if-ge p3, v0, :cond_0

    const v0, 0x7f04001b

    const v1, 0x7f04001f

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/park/activity/CoverFlowAct;->overridePendingTransition(II)V

    goto :goto_1
.end method

.method public onItemSelected(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->a:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/xingbook/park/activity/CoverFlowAct;->c:[Lcn/a/a/c/a;

    aget-object v1, v1, p3

    invoke-virtual {v1}, Lcn/a/a/c/a;->b()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iput p3, p0, Lcom/xingbook/park/activity/CoverFlowAct;->d:I

    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_0

    const/4 v0, -0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/CoverFlowAct;->setResult(I)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->finish()V

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onNothingSelected(Landroid/widget/AdapterView;)V
    .locals 0

    return-void
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void
.end method

.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 2

    const/16 v1, 0x64

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    check-cast p1, Landroid/widget/ImageView;

    invoke-static {p1, v1}, Lcom/xingbook/c/e;->a(Landroid/widget/ImageView;I)V

    :goto_0
    const/4 v0, 0x1

    return v0

    :pswitch_0
    check-cast p1, Landroid/widget/ImageView;

    invoke-static {p1, v1}, Lcom/xingbook/c/e;->a(Landroid/widget/ImageView;I)V

    goto :goto_0

    :pswitch_1
    check-cast p1, Landroid/widget/ImageView;

    const/16 v0, 0xff

    invoke-static {p1, v0}, Lcom/xingbook/c/e;->a(Landroid/widget/ImageView;I)V

    iget-object v0, p0, Lcom/xingbook/park/activity/CoverFlowAct;->e:Lcom/xingbook/c/a;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/xingbook/c/a;->a(I)V

    const/4 v0, -0x1

    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/CoverFlowAct;->setResult(I)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/CoverFlowAct;->finish()V

    goto :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
